#ifndef _POISSON_EQUATION_H
#define _POISSON_EQUATION_H


#include <functional>


class PoissonEquation
{
 
public:
    /** 
     * 默认构造函数
     * 
     */
    PoissonEquation() = default;
    /** 
     * 默认析构函数
     * 
     */
    ~PoissonEquation() = default;
     /**
     * @brief Set the Right Hands Term Function object
     * 
     */
    void SetRightHandsTermFunction(std::function<double(double*)>);
     /**
     * @brief Set the Boundary Condition Function object
     * 
     */
    void SetBoundaryConditionFunction(std::function<double(double*)>);
    /**
     * @brief Return Right Hands Term Function object
     * 
     * @return std::function<double(double*)> 
     */
    std::function<double(double*)> RightHandsTermFunction();
     /**
     * @brief Return Boundary Condition Function object
     * 
     * @return std::function<double(double*)> 
     */
    std::function<double(double*)> BoundaryConditionFunction();
protected:
    std::function<double(double*)> _F;/*<Poisson方程右端项*/
    std::function<double(double*)> _BCF;/*<Poisson方程边界条件*/
};


void PoissonEquation::SetRightHandsTermFunction(const std::function<double(double*)> F)
{
  _F = F;
};



void PoissonEquation::SetBoundaryConditionFunction(const std::function<double(double*)> BCF)
{
   _BCF = BCF;
};


std::function<double(double *)> PoissonEquation::RightHandsTermFunction()
{
    return _F;
};


std::function<double(double *)> PoissonEquation::BoundaryConditionFunction()
{
    return _BCF;
};



#endif /* _POISSON_EQUATION_H */


